package client;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JTabbedPane;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import java.awt.GridLayout;
import java.awt.FlowLayout;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;

public class NewDossier {

	private JFrame frame;
	private JTextField textField;
	private JTextField textField_3;
	private JTextField textField_4;
	private JTextField textField_5;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_6;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					NewDossier window = new NewDossier();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public NewDossier() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 * Set Frame Static --> Fullscreen -> Scrollable
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(200, 200, 900, 700);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBounds(0, 0, 884, 662);
		frame.getContentPane().add(tabbedPane);
		
		JPanel tabNewDossier = new JPanel();
		tabbedPane.addTab("new dossier", null, tabNewDossier, null);
		tabNewDossier.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Question");
		lblNewLabel.setBounds(33, 60, 76, 14);
		lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT);
		lblNewLabel.setVerticalAlignment(SwingConstants.TOP);
		tabNewDossier.add(lblNewLabel);
		
		textField = new JTextField();
		textField.setBounds(30, 85, 548, 89);
		tabNewDossier.add(textField);
		textField.setColumns(10);
		
		JLabel lblAnalysis = new JLabel("Analysis");
		lblAnalysis.setVerticalAlignment(SwingConstants.TOP);
		lblAnalysis.setHorizontalAlignment(SwingConstants.LEFT);
		lblAnalysis.setBounds(33, 185, 65, 14);
		tabNewDossier.add(lblAnalysis);
		
		JLabel lblJudgement = new JLabel("Judgement");
		lblJudgement.setVerticalAlignment(SwingConstants.TOP);
		lblJudgement.setHorizontalAlignment(SwingConstants.LEFT);
		lblJudgement.setBounds(33, 310, 97, 14);
		tabNewDossier.add(lblJudgement);
		
		JLabel lblComment = new JLabel("Comment");
		lblComment.setVerticalAlignment(SwingConstants.TOP);
		lblComment.setHorizontalAlignment(SwingConstants.LEFT);
		lblComment.setBounds(36, 428, 73, 14);
		tabNewDossier.add(lblComment);
		
		JButton btnSaveDossier = new JButton("Save dossier");
		btnSaveDossier.setBounds(50, 580, 108, 23);
		tabNewDossier.add(btnSaveDossier);
		
		JButton btnVisualize = new JButton("Mutate");
		btnVisualize.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		btnVisualize.setBounds(168, 580, 101, 23);
		tabNewDossier.add(btnVisualize);
		
		JButton btnCancel = new JButton("Cancel");
		btnCancel.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		btnCancel.setBounds(279, 580, 108, 23);
		tabNewDossier.add(btnCancel);
		
		JLabel lblDate = new JLabel("Date");
		lblDate.setVerticalAlignment(SwingConstants.TOP);
		lblDate.setHorizontalAlignment(SwingConstants.LEFT);
		lblDate.setBounds(627, 30, 46, 14);
		tabNewDossier.add(lblDate);
		
		JLabel lblYyyymmdd = new JLabel("YYYY-MM-DD");
		lblYyyymmdd.setVerticalAlignment(SwingConstants.TOP);
		lblYyyymmdd.setHorizontalAlignment(SwingConstants.LEFT);
		lblYyyymmdd.setBounds(683, 30, 90, 14);
		tabNewDossier.add(lblYyyymmdd);
		
		JLabel lblUserComment = new JLabel("User comment");
		lblUserComment.setVerticalAlignment(SwingConstants.TOP);
		lblUserComment.setHorizontalAlignment(SwingConstants.LEFT);
		lblUserComment.setBounds(464, 428, 114, 14);
		tabNewDossier.add(lblUserComment);
		
		textField_3 = new JTextField();
		textField_3.setColumns(10);
		textField_3.setBounds(33, 452, 395, 117);
		tabNewDossier.add(textField_3);
		
		textField_4 = new JTextField();
		textField_4.setColumns(10);
		textField_4.setBounds(461, 452, 382, 117);
		tabNewDossier.add(textField_4);
		
		JButton btnNewButton = new JButton("Hexagram");
		btnNewButton.setBounds(627, 85, 185, 289);
		tabNewDossier.add(btnNewButton);
		
		textField_5 = new JTextField();
		textField_5.setColumns(10);
		textField_5.setBounds(33, 210, 548, 89);
		tabNewDossier.add(textField_5);
		
		textField_1 = new JTextField();
		textField_1.setColumns(10);
		textField_1.setBounds(33, 335, 548, 89);
		tabNewDossier.add(textField_1);
		
		JPanel tabLinkDossier = new JPanel();
		tabbedPane.addTab("link dossier", null, tabLinkDossier, null);
		tabLinkDossier.setLayout(null);
		
		JLabel lblNewLabel_1 = new JLabel("Question");
		lblNewLabel_1.setBounds(33, 60, 76, 14);
		tabLinkDossier.add(lblNewLabel_1);
		
		JLabel lblRelatedQuestion = new JLabel("Related question");
		lblRelatedQuestion.setBounds(33, 288, 95, 14);
		tabLinkDossier.add(lblRelatedQuestion);
		
		textField_2 = new JTextField();
		textField_2.setBounds(33, 90, 780, 161);
		tabLinkDossier.add(textField_2);
		textField_2.setColumns(10);
		
		textField_6 = new JTextField();
		textField_6.setColumns(10);
		textField_6.setBounds(33, 324, 780, 299);
		tabLinkDossier.add(textField_6);
		
		JPanel tabUnlinkDossier = new JPanel();
		tabbedPane.addTab("unlink dossier", null, tabUnlinkDossier, null);
		
		JPanel tabShowDossier = new JPanel();
		tabbedPane.addTab("show dossier", null, tabShowDossier, null);
		
		JPanel tabExport = new JPanel();
		tabbedPane.addTab("export", null, tabExport, null);
		
		JPanel tabExitProfile = new JPanel();
		tabbedPane.addTab("edit profile", null, tabExitProfile, null);
	}
}
